package com.dq.repository.goods;

import com.dq.domain.category.Category;
import com.dq.domain.goods.Goods;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author liuhui
 * @date 2019/9/16 0016 13:59:36
 */
@Repository
public interface GoodsRepository extends JpaRepository<Goods, Long> {
    List<Goods> findByIdIn(List<Long> ids);

    List<Goods> findByDeletedFalse();
    Goods findByDeletedFalseAndGoodsNo(String goodsNo);

    List<Goods> findByDeletedFalseAndCategoryInOrderByCreateTimeDesc(List<Category> categorys);

}
